.class public Lcom/baidu/mobads/openad/b/a$a;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/baidu/mobads/openad/b/a;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x4
    name = "a"
.end annotation


# instance fields
.field protected a:I

.field protected b:Ljava/net/URL;

.field protected c:Ljava/lang/String;

.field protected d:I

.field protected e:I

.field protected f:I

.field protected g:Z

.field protected h:Ljava/lang/Thread;

.field final synthetic i:Lcom/baidu/mobads/openad/b/a;

.field private volatile j:Z

.field private volatile k:I

.field private l:Ljava/net/HttpURLConnection;


# direct methods
.method public constructor <init>(Lcom/baidu/mobads/openad/b/a;ILjava/net/URL;Ljava/lang/String;III)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 p1, 0x0

    .line 2
    iput-boolean p1, p0, Lcom/baidu/mobads/openad/b/a$a;->j:Z

    .line 3
    iput p1, p0, Lcom/baidu/mobads/openad/b/a$a;->k:I

    .line 4
    iput p2, p0, Lcom/baidu/mobads/openad/b/a$a;->a:I

    .line 5
    iput-object p3, p0, Lcom/baidu/mobads/openad/b/a$a;->b:Ljava/net/URL;

    .line 6
    iput-object p4, p0, Lcom/baidu/mobads/openad/b/a$a;->c:Ljava/lang/String;

    .line 7
    iput p5, p0, Lcom/baidu/mobads/openad/b/a$a;->d:I

    .line 8
    iput p6, p0, Lcom/baidu/mobads/openad/b/a$a;->e:I

    .line 9
    iput p7, p0, Lcom/baidu/mobads/openad/b/a$a;->f:I

    .line 10
    iput-boolean p1, p0, Lcom/baidu/mobads/openad/b/a$a;->g:Z

    return-void
.end method


# virtual methods
.method public a(Ljava/net/HttpURLConnection;)V
    .locals 0

    .line 2
    iput-object p1, p0, Lcom/baidu/mobads/openad/b/a$a;->l:Ljava/net/HttpURLConnection;

    return-void
.end method

.method public a()Z
    .locals 1

    .line 1
    iget-boolean v0, p0, Lcom/baidu/mobads/openad/b/a$a;->g:Z

    return v0
.end method

.method public declared-synchronized b()V
    .locals 1

    monitor-enter p0

    const/4 v0, 0x0

    .line 1
    :try_start_0
    iput-boolean v0, p0, Lcom/baidu/mobads/openad/b/a$a;->j:Z

    .line 2
    new-instance v0, Ljava/lang/Thread;

    invoke-direct {v0, p0}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    iput-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->h:Ljava/lang/Thread;

    .line 3
    invoke-virtual {v0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 4
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized c()V
    .locals 2

    monitor-enter p0

    const/4 v0, 0x1

    .line 1
    :try_start_0
    iput-boolean v0, p0, Lcom/baidu/mobads/openad/b/a$a;->j:Z

    .line 2
    iget v1, p0, Lcom/baidu/mobads/openad/b/a$a;->k:I

    add-int/2addr v1, v0

    iput v1, p0, Lcom/baidu/mobads/openad/b/a$a;->k:I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 3
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public d()V
    .locals 4

    .line 1
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->h:Ljava/lang/Thread;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Ljava/lang/Thread;->join()V

    goto :goto_0

    .line 3
    :cond_0
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v0

    invoke-virtual {v0}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v0

    const/4 v1, 0x2

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    const-string v3, "DownloadThread"

    aput-object v3, v1, v2

    const/4 v2, 0x1

    const-string v3, "Warning: mThread in DownloadThread.waitFinish is null"

    aput-object v3, v1, v2

    .line 4
    invoke-interface {v0, v1}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->w([Ljava/lang/Object;)I

    :goto_0
    return-void
.end method

.method public run()V
    .locals 12

    .line 1
    iget v0, p0, Lcom/baidu/mobads/openad/b/a$a;->k:I

    const/4 v1, 0x0

    const/4 v2, 0x2

    const/4 v3, 0x1

    const/4 v4, 0x0

    .line 2
    :try_start_0
    iget v5, p0, Lcom/baidu/mobads/openad/b/a$a;->d:I

    iget v6, p0, Lcom/baidu/mobads/openad/b/a$a;->f:I

    add-int/2addr v5, v6

    iget v6, p0, Lcom/baidu/mobads/openad/b/a$a;->e:I

    if-lt v5, v6, :cond_0

    .line 3
    iput-boolean v3, p0, Lcom/baidu/mobads/openad/b/a$a;->g:Z

    move-object v5, v1

    move-object v6, v5

    goto/16 :goto_3

    .line 4
    :cond_0
    iget-object v5, p0, Lcom/baidu/mobads/openad/b/a$a;->l:Ljava/net/HttpURLConnection;

    if-nez v5, :cond_9

    .line 5
    iget-object v5, p0, Lcom/baidu/mobads/openad/b/a$a;->b:Ljava/net/URL;

    invoke-virtual {v5}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;

    move-result-object v5

    check-cast v5, Ljava/net/HttpURLConnection;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_5
    .catchall {:try_start_0 .. :try_end_0} :catchall_3

    .line 6
    :try_start_1
    iget-object v6, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    iget-object v6, v6, Lcom/baidu/mobads/openad/b/a;->f:Ljava/lang/Boolean;

    invoke-virtual {v6}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v6

    if-eqz v6, :cond_1

    .line 7
    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    iget v7, p0, Lcom/baidu/mobads/openad/b/a$a;->d:I

    iget v8, p0, Lcom/baidu/mobads/openad/b/a$a;->f:I

    add-int/2addr v7, v8

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v7, "-"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v7, p0, Lcom/baidu/mobads/openad/b/a$a;->e:I

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    const-string v7, "Range"

    .line 8
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    const-string v9, "bytes="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v8, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v7, v6}, Ljava/net/HttpURLConnection;->setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 9
    :cond_1
    iput v4, p0, Lcom/baidu/mobads/openad/b/a$a;->f:I

    .line 10
    :goto_0
    invoke-virtual {v5}, Ljava/net/HttpURLConnection;->connect()V

    .line 11
    invoke-virtual {v5}, Ljava/net/HttpURLConnection;->getResponseCode()I

    move-result v6

    const/16 v7, 0x12e

    if-eq v6, v7, :cond_2

    const/16 v7, 0x12d

    if-ne v6, v7, :cond_3

    .line 12
    :cond_2
    invoke-virtual {v5, v4}, Ljava/net/HttpURLConnection;->setInstanceFollowRedirects(Z)V

    .line 13
    iget-object v6, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v6, v5}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;Ljava/net/HttpURLConnection;)Ljava/net/HttpURLConnection;

    move-result-object v5

    .line 14
    invoke-virtual {v5}, Ljava/net/HttpURLConnection;->getResponseCode()I

    move-result v6

    .line 15
    :cond_3
    iget v7, p0, Lcom/baidu/mobads/openad/b/a$a;->k:I
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_4
    .catchall {:try_start_1 .. :try_end_1} :catchall_2

    if-eq v0, v7, :cond_5

    .line 16
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v1

    .line 17
    invoke-virtual {v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Thread["

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v3, p0, Lcom/baidu/mobads/openad/b/a$a;->a:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v3, "] ver("

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v0, ") executed end; isFinished="

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-boolean v0, p0, Lcom/baidu/mobads/openad/b/a$a;->g:Z

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v2, "DownloadThread"

    .line 18
    invoke-interface {v1, v2, v0}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 19
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v0}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;)Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;

    move-result-object v0

    if-eqz v0, :cond_4

    .line 20
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v0}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;)Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;

    move-result-object v0

    invoke-interface {v0, v5}, Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;->closeHttpURLConnection(Ljava/net/HttpURLConnection;)V

    :cond_4
    return-void

    .line 21
    :cond_5
    :try_start_2
    div-int/lit8 v6, v6, 0x64

    if-eq v6, v2, :cond_7

    .line 22
    iget-object v6, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-virtual {v6}, Lcom/baidu/mobads/openad/b/a;->b()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_4
    .catchall {:try_start_2 .. :try_end_2} :catchall_2

    .line 23
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v1

    .line 24
    invoke-virtual {v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Thread["

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v3, p0, Lcom/baidu/mobads/openad/b/a$a;->a:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v3, "] ver("

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v0, ") executed end; isFinished="

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-boolean v0, p0, Lcom/baidu/mobads/openad/b/a$a;->g:Z

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v2, "DownloadThread"

    .line 25
    invoke-interface {v1, v2, v0}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 26
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v0}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;)Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;

    move-result-object v0

    if-eqz v0, :cond_6

    .line 27
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v0}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;)Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;

    move-result-object v0

    invoke-interface {v0, v5}, Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;->closeHttpURLConnection(Ljava/net/HttpURLConnection;)V

    :cond_6
    return-void

    .line 28
    :cond_7
    :try_start_3
    invoke-virtual {v5}, Ljava/net/HttpURLConnection;->getContentType()Ljava/lang/String;

    move-result-object v6

    const-string v7, "text/html"

    .line 29
    invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_a

    .line 30
    iget-object v6, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-virtual {v6}, Lcom/baidu/mobads/openad/b/a;->b()V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_4
    .catchall {:try_start_3 .. :try_end_3} :catchall_2

    .line 31
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v1

    .line 32
    invoke-virtual {v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Thread["

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v3, p0, Lcom/baidu/mobads/openad/b/a$a;->a:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v3, "] ver("

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v0, ") executed end; isFinished="

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-boolean v0, p0, Lcom/baidu/mobads/openad/b/a$a;->g:Z

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v2, "DownloadThread"

    .line 33
    invoke-interface {v1, v2, v0}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 34
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v0}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;)Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;

    move-result-object v0

    if-eqz v0, :cond_8

    .line 35
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v0}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;)Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;

    move-result-object v0

    invoke-interface {v0, v5}, Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;->closeHttpURLConnection(Ljava/net/HttpURLConnection;)V

    :cond_8
    return-void

    .line 36
    :cond_9
    :try_start_4
    iget-object v5, p0, Lcom/baidu/mobads/openad/b/a$a;->l:Ljava/net/HttpURLConnection;
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_5
    .catchall {:try_start_4 .. :try_end_4} :catchall_3

    .line 37
    :try_start_5
    iput-object v1, p0, Lcom/baidu/mobads/openad/b/a$a;->l:Ljava/net/HttpURLConnection;

    .line 38
    :cond_a
    new-instance v6, Ljava/io/BufferedInputStream;

    invoke-virtual {v5}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;

    move-result-object v7

    invoke-direct {v6, v7}, Ljava/io/BufferedInputStream;-><init>(Ljava/io/InputStream;)V
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_4
    .catchall {:try_start_5 .. :try_end_5} :catchall_2

    .line 39
    :try_start_6
    iget v7, p0, Lcom/baidu/mobads/openad/b/a$a;->d:I

    iget v8, p0, Lcom/baidu/mobads/openad/b/a$a;->f:I

    add-int/2addr v7, v8

    .line 40
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v8

    invoke-virtual {v8}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v8

    const-string v9, "DownloadThread"

    new-instance v10, Ljava/lang/StringBuilder;

    invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V

    const-string v11, "tmpStartByte = "

    invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v10, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    invoke-interface {v8, v9, v10}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 41
    new-instance v8, Ljava/io/RandomAccessFile;

    iget-object v9, p0, Lcom/baidu/mobads/openad/b/a$a;->c:Ljava/lang/String;

    const-string v10, "rw"

    invoke-direct {v8, v9, v10}, Ljava/io/RandomAccessFile;-><init>(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_3
    .catchall {:try_start_6 .. :try_end_6} :catchall_4

    int-to-long v9, v7

    .line 42
    :try_start_7
    invoke-virtual {v8, v9, v10}, Ljava/io/RandomAccessFile;->seek(J)V

    const v1, 0x19000

    new-array v9, v1, [B

    .line 43
    :goto_1
    iget-object v10, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    iget-object v10, v10, Lcom/baidu/mobads/openad/b/a;->i:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    sget-object v11, Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;->DOWNLOADING:Lcom/baidu/mobads/openad/interfaces/download/IOAdDownloader$DownloadStatus;

    if-ne v10, v11, :cond_d

    invoke-virtual {v6, v9, v4, v1}, Ljava/io/BufferedInputStream;->read([BII)I

    move-result v10

    const/4 v11, -0x1

    if-eq v10, v11, :cond_d

    iget v11, p0, Lcom/baidu/mobads/openad/b/a$a;->e:I

    if-ge v7, v11, :cond_d

    .line 44
    iget v11, p0, Lcom/baidu/mobads/openad/b/a$a;->k:I

    if-eq v0, v11, :cond_b

    goto :goto_2

    .line 45
    :cond_b
    invoke-virtual {v8, v9, v4, v10}, Ljava/io/RandomAccessFile;->write([BII)V

    .line 46
    iget v11, p0, Lcom/baidu/mobads/openad/b/a$a;->f:I

    add-int/2addr v11, v10

    iput v11, p0, Lcom/baidu/mobads/openad/b/a$a;->f:I

    add-int/2addr v7, v10

    .line 47
    iget-object v11, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-virtual {v11, v10}, Lcom/baidu/mobads/openad/b/a;->a(I)V

    .line 48
    monitor-enter p0
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_2
    .catchall {:try_start_7 .. :try_end_7} :catchall_1

    .line 49
    :try_start_8
    iget-boolean v10, p0, Lcom/baidu/mobads/openad/b/a$a;->j:Z

    if-eqz v10, :cond_c

    .line 50
    monitor-exit p0

    goto :goto_2

    .line 51
    :cond_c
    monitor-exit p0

    goto :goto_1

    :catchall_0
    move-exception v1

    monitor-exit p0
    :try_end_8
    .catchall {:try_start_8 .. :try_end_8} :catchall_0

    :try_start_9
    throw v1

    .line 52
    :cond_d
    :goto_2
    iget v1, p0, Lcom/baidu/mobads/openad/b/a$a;->e:I

    if-lt v7, v1, :cond_e

    .line 53
    iput-boolean v3, p0, Lcom/baidu/mobads/openad/b/a$a;->g:Z
    :try_end_9
    .catch Ljava/lang/Exception; {:try_start_9 .. :try_end_9} :catch_2
    .catchall {:try_start_9 .. :try_end_9} :catchall_1

    :cond_e
    move-object v1, v8

    .line 54
    :goto_3
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v7

    .line 55
    invoke-virtual {v7}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v7

    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    const-string v9, "Thread["

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v9, p0, Lcom/baidu/mobads/openad/b/a$a;->a:I

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v9, "] ver("

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v8, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v0, ") executed end; isFinished="

    invoke-virtual {v8, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-boolean v0, p0, Lcom/baidu/mobads/openad/b/a$a;->g:Z

    invoke-virtual {v8, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v8, "DownloadThread"

    .line 56
    invoke-interface {v7, v8, v0}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    if-eqz v1, :cond_f

    .line 57
    :try_start_a
    invoke-virtual {v1}, Ljava/io/RandomAccessFile;->close()V
    :try_end_a
    .catch Ljava/lang/Exception; {:try_start_a .. :try_end_a} :catch_0

    goto :goto_4

    :catch_0
    move-exception v0

    .line 58
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v1

    invoke-virtual {v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v1

    new-array v7, v2, [Ljava/lang/Object;

    const-string v8, "DownloadThread"

    aput-object v8, v7, v4

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    aput-object v0, v7, v3

    invoke-interface {v1, v7}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->w([Ljava/lang/Object;)I

    :cond_f
    :goto_4
    if-eqz v6, :cond_10

    .line 59
    :try_start_b
    invoke-virtual {v6}, Ljava/io/BufferedInputStream;->close()V
    :try_end_b
    .catch Ljava/lang/Exception; {:try_start_b .. :try_end_b} :catch_1

    goto :goto_5

    :catch_1
    move-exception v0

    .line 60
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v1

    invoke-virtual {v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v1

    new-array v2, v2, [Ljava/lang/Object;

    const-string v6, "DownloadThread"

    aput-object v6, v2, v4

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    aput-object v0, v2, v3

    invoke-interface {v1, v2}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->w([Ljava/lang/Object;)I

    .line 61
    :cond_10
    :goto_5
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v0}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;)Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;

    move-result-object v0

    if-eqz v0, :cond_14

    .line 62
    :goto_6
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v0}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;)Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;

    move-result-object v0

    invoke-interface {v0, v5}, Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;->closeHttpURLConnection(Ljava/net/HttpURLConnection;)V

    goto/16 :goto_a

    :catchall_1
    move-exception v1

    move-object v7, v1

    move-object v1, v8

    goto/16 :goto_b

    :catch_2
    move-exception v1

    move-object v7, v1

    move-object v1, v8

    goto :goto_7

    :catch_3
    move-exception v7

    goto :goto_7

    :catchall_2
    move-exception v6

    move-object v7, v6

    move-object v6, v1

    goto/16 :goto_b

    :catch_4
    move-exception v6

    move-object v7, v6

    move-object v6, v1

    goto :goto_7

    :catchall_3
    move-exception v5

    move-object v6, v1

    move-object v7, v5

    move-object v5, v6

    goto/16 :goto_b

    :catch_5
    move-exception v5

    move-object v6, v1

    move-object v7, v5

    move-object v5, v6

    .line 63
    :goto_7
    :try_start_c
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v8

    invoke-virtual {v8}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v8

    const-string v9, "DownloadThread"

    invoke-virtual {v7}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v7

    invoke-interface {v8, v9, v7}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 64
    iget v7, p0, Lcom/baidu/mobads/openad/b/a$a;->k:I

    if-ne v0, v7, :cond_11

    .line 65
    iget-object v7, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-virtual {v7}, Lcom/baidu/mobads/openad/b/a;->b()V
    :try_end_c
    .catchall {:try_start_c .. :try_end_c} :catchall_4

    .line 66
    :cond_11
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v7

    .line 67
    invoke-virtual {v7}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v7

    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    const-string v9, "Thread["

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v9, p0, Lcom/baidu/mobads/openad/b/a$a;->a:I

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v9, "] ver("

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v8, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v0, ") executed end; isFinished="

    invoke-virtual {v8, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-boolean v0, p0, Lcom/baidu/mobads/openad/b/a$a;->g:Z

    invoke-virtual {v8, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v8, "DownloadThread"

    .line 68
    invoke-interface {v7, v8, v0}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    if-eqz v1, :cond_12

    .line 69
    :try_start_d
    invoke-virtual {v1}, Ljava/io/RandomAccessFile;->close()V
    :try_end_d
    .catch Ljava/lang/Exception; {:try_start_d .. :try_end_d} :catch_6

    goto :goto_8

    :catch_6
    move-exception v0

    .line 70
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v1

    invoke-virtual {v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v1

    new-array v7, v2, [Ljava/lang/Object;

    const-string v8, "DownloadThread"

    aput-object v8, v7, v4

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    aput-object v0, v7, v3

    invoke-interface {v1, v7}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->w([Ljava/lang/Object;)I

    :cond_12
    :goto_8
    if-eqz v6, :cond_13

    .line 71
    :try_start_e
    invoke-virtual {v6}, Ljava/io/BufferedInputStream;->close()V
    :try_end_e
    .catch Ljava/lang/Exception; {:try_start_e .. :try_end_e} :catch_7

    goto :goto_9

    :catch_7
    move-exception v0

    .line 72
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v1

    invoke-virtual {v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v1

    new-array v2, v2, [Ljava/lang/Object;

    const-string v6, "DownloadThread"

    aput-object v6, v2, v4

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    aput-object v0, v2, v3

    invoke-interface {v1, v2}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->w([Ljava/lang/Object;)I

    .line 73
    :cond_13
    :goto_9
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v0}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;)Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;

    move-result-object v0

    if-eqz v0, :cond_14

    goto/16 :goto_6

    :cond_14
    :goto_a
    return-void

    :catchall_4
    move-exception v7

    .line 74
    :goto_b
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v8

    .line 75
    invoke-virtual {v8}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v8

    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

    const-string v10, "Thread["

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v10, p0, Lcom/baidu/mobads/openad/b/a$a;->a:I

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v10, "] ver("

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v9, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v0, ") executed end; isFinished="

    invoke-virtual {v9, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-boolean v0, p0, Lcom/baidu/mobads/openad/b/a$a;->g:Z

    invoke-virtual {v9, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v9, "DownloadThread"

    .line 76
    invoke-interface {v8, v9, v0}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->d(Ljava/lang/String;Ljava/lang/String;)I

    if-eqz v1, :cond_15

    .line 77
    :try_start_f
    invoke-virtual {v1}, Ljava/io/RandomAccessFile;->close()V
    :try_end_f
    .catch Ljava/lang/Exception; {:try_start_f .. :try_end_f} :catch_8

    goto :goto_c

    :catch_8
    move-exception v0

    .line 78
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v1

    invoke-virtual {v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v1

    new-array v8, v2, [Ljava/lang/Object;

    const-string v9, "DownloadThread"

    aput-object v9, v8, v4

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    aput-object v0, v8, v3

    invoke-interface {v1, v8}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->w([Ljava/lang/Object;)I

    :cond_15
    :goto_c
    if-eqz v6, :cond_16

    .line 79
    :try_start_10
    invoke-virtual {v6}, Ljava/io/BufferedInputStream;->close()V
    :try_end_10
    .catch Ljava/lang/Exception; {:try_start_10 .. :try_end_10} :catch_9

    goto :goto_d

    :catch_9
    move-exception v0

    .line 80
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v1

    invoke-virtual {v1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getAdLogger()Lcom/baidu/mobads/interfaces/utils/IXAdLogger;

    move-result-object v1

    new-array v2, v2, [Ljava/lang/Object;

    const-string v6, "DownloadThread"

    aput-object v6, v2, v4

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    aput-object v0, v2, v3

    invoke-interface {v1, v2}, Lcom/baidu/mobads/interfaces/utils/IXAdLogger;->w([Ljava/lang/Object;)I

    .line 81
    :cond_16
    :goto_d
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v0}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;)Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;

    move-result-object v0

    if-eqz v0, :cond_17

    .line 82
    iget-object v0, p0, Lcom/baidu/mobads/openad/b/a$a;->i:Lcom/baidu/mobads/openad/b/a;

    invoke-static {v0}, Lcom/baidu/mobads/openad/b/a;->a(Lcom/baidu/mobads/openad/b/a;)Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;

    move-result-object v0

    invoke-interface {v0, v5}, Lcom/baidu/mobads/interfaces/utils/IXAdURIUitls;->closeHttpURLConnection(Ljava/net/HttpURLConnection;)V

    :cond_17
    goto :goto_f

    :goto_e
    throw v7

    :goto_f
    goto :goto_e
.end method
